import request from '@/core/interceptors'

/**
 * @param {string} categoryID 分类ID
 */
export const getFood = (categoryID?) => {
    return request({
        url: import.meta.env.VITE_MENU_PATH + `/food`,
        method: "get",
        data: categoryID
    });
};

export const createFood = (data) => {
    return request({
        url: import.meta.env.VITE_MENU_PATH + `/food`,
        method: "post",
        data: data,
        headers: {'Content-type' : 'multipart/form-data'}
    });
};